package com.nf.action;

import com.nf.entity.Message;
import com.nf.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestAction {

    @Autowired
    private TestService testService;

    @RequestMapping("/abc")
    public Message kkk(Model model){
//        Message message = new Message();
//        message.setCode(500);
//        message.setInfo("服务器失败");
        return testService.getMessage();
    }
}
